package com.biz.primus.management.cat.degraded;

import com.biz.primus.base.exception.BizSilentException;
import com.biz.primus.common.vo.SpringPageVO;
import com.biz.primus.management.cat.feign.CatFeignClient;
import com.biz.primus.model.cat.enums.CatSaleStatusEnum;
import com.biz.primus.model.cat.enums.CatStatus;
import com.biz.primus.model.cat.vo.CatQueryVo;
import com.biz.primus.model.cat.vo.CatVo;
import java.util.List;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

/**
 * cat feign client熔断策略,统一以Degraded+{对应feign client类名}来命名
 *
 * @author yanweijin
 * @date 2017/9/13
 */
@Component
@Slf4j
public class DegradedCatFeignClient implements CatFeignClient {


    @Override
    public CatVo save(CatVo cat) {

        throw new BizSilentException("Method not support");
    }

    @Override
    public CatVo getByName(String name) {
        return null;
    }

    @Override
    public List<CatVo> listByStatus(CatStatus status) {
        return null;
    }

    @Override
    public List<CatVo> listBySaleStatus(CatSaleStatusEnum saleStatus) {
        return null;
    }

    @Override
    public CatVo get(Long id) {
        return null;
    }

    @Override
    public void updateSaleStatus(Long id, CatSaleStatusEnum saleStatus) {

    }

    @Override
    public SpringPageVO<CatVo> findAll(CatQueryVo queryVo) {
        log.info("Return empty result.");
        return new SpringPageVO<>();
    }
}
